using System;

namespace QUAN_LY_NGAN_HANG_CAU_HOI_TRAC_NGHIEM
{
    public class CapNhatGiaoVienPresenter
    {
        private ICapNhatGiaoVien view;

        public void Init(ICapNhatGiaoVien v)
        {
            view = v;
        }
        public GiaoVienDAL LayThongTinGiaoVien(string Username)
        {
           return GiaoVienBUS.LayThongTinGiaoVienTheoMaTaiKhoan(Username);
        }
        public void CapNhatGiaoVien(string tenGV, string hoGV, string cmnd, string dc, string dt, string ns, string pass)
        {
            GiaoVienDAL gv = new GiaoVienDAL();
            TaiKhoanDAL tk = new TaiKhoanDAL();
            gv.TenGiaoVien = tenGV;
            gv.HoGiaoVien = hoGV;
            gv.CMND = cmnd;
            gv.DiaChi = dc;
            gv.DienThoai = dt;
            DateTime ngaysinh;
            if (DateTime.TryParse(ns, out ngaysinh) == true)
                gv.NgaySinh = ngaysinh;
            tk.Password = pass;
            //GiaoVienBUS(gv, tk);
        }
   
    }
}